{extend name="admin@public/base_content" /}
{block name="body">}
<body>
{include file="admin@public/common" /}
<div class="container-fluid larry-wrapper">
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12">
            <section class="panel panel-padding">
                <form class="layui-form layui-form-pane">
                    <div class="layui-form-item">
                        <label class="layui-form-label">内容标题</label>
                        <div class="layui-input-block">
                            <input type="text" name="title" value="{$info.title}" jq-verify="required" jq-error=" 请输入内容标题" placeholder="请输入内容标题" class="layui-input ">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">编辑人</label>
                        <div class="layui-input-block">
                            <input type="text" name="poper" value="{$info.poper}" jq-verify="" jq-error="请输入编辑人" placeholder="请输入编辑人" class="layui-input ">
                        </div>
                    </div>

                    <div class="layui-form-item" pane>
                        <label class="layui-form-label">显示状态</label>
                        <div class="layui-input-inline">
                            <input type="radio" name="status" {eq name="$info.status" value="1"}checked{/eq} title="正常" value="1" checked />
                            <input type="radio" name="status" {eq name="$info.status" value="2"}checked{/eq} title="禁用" value="2" />
                        </div>
                    </div>

                    <div class="layui-form-item" pane>
                        <label class="layui-form-label">是否推荐</label>
                        <div class="layui-input-inline">
                            <input type="radio" name="recommend" {eq name="$info.recommend" value="1"}checked{/eq} title="是" value="1" checked />
                            <input type="radio" name="recommend" {eq name="$info.recommend" value="2"}checked{/eq} title="否" value="2"  />
                        </div>
                    </div>

                    <div class="layui-form-item" pane>
                        <label class="layui-form-label">显示状态</label>
                        <div class="layui-input-inline">
                            <input type="radio" name="recommend_position" {eq name="$info.recommend_position" value="1"}checked{/eq} title="图集" value="1" checked />
                            <input type="radio" name="recommend_position" {eq name="$info.recommend_position" value="2"}checked{/eq} title="列表" value="2"  />
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">封面图</label>
                        <div class="layui-input-block">
                            <input type="file" name="image" class="layui-upload-file" id="upload_one">
                            <input type="hidden" name="image" value="{$info.image|default=''}" jq-error="请上传封面图" error-id="img-error">
                            <p id="img-error" class="error"></p>
                        </div>
                        {notempty name="info.image"}
                        <div class="layui-input-block">
                            <div class="imgbox"><img src="{$info.image}" alt="..." class="img-thumbnail"></div>
                        </div>
                        {/notempty}
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">内容</label>
                        <div class="layui-input-block">
                            <textarea name="content" class="king_content" cols="100" rows="20">{$info.content|default=''}</textarea>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">内容类型</label>
                        <div class="layui-input-inline">
                            <select class="tpl-form-input" jq-verify="required" jq-error="请选择内容类型" lay-filter="verify" name="type">
                                <option value="">请选择内容类型</option>
                                <option value="1" {if condition="$info.type == 1"}selected{/if}>新闻</option>
                                <option value="2" {if condition="$info.type == 2"}selected{/if}>公告</option>
                            </select>
                        </div>
                    </div>

                    <div class="layui-input-block">
                        <input type="hidden" name="id" type="hidden" value="{$info.id}">
                        <button class="layui-btn" jq-submit lay-filter="submit" jq-tab="true">立即提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </form>
            </section>
        </div>
    </div>
</div>
</body>
{/block}
{block name="script"}
<!--kingeditor编辑器开始-->
<script>
    //document.domain = 'domain.com';
    KindEditor.ready(function(K) {
        window.editor = K.create('.king_content', {
            allowFileManager : true,
            langType : 'zh-CN',
            autoHeightMode : true,
            afterBlur: function () { this.sync(); },
        });
    });
</script>
<!--kingeditor编辑器结束-->
<script>
    layui.use('myform');
</script>
{/block}